]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shell/util: Drop unused capture_images() function
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 5 Jan 2024 10:46:59 +0000 (11:46 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 5 Jan 2024 10:49:28 +0000 (11:49 +0100)
It hasn't been used since commit 757e4b6731, so drop it. This
also avoids a warning when generating the typelib that was
introduced in commit f48729f6e.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3091>

src/shell-util.c
src/shell-util.h

index 35d1f6fa3551e4b289ba45d0f1c2a3dd2aaab150..3f91d547df29012004fd9b467a03b229d203e7de 100644 (file)
@@ -353,48 +353,6 @@ shell_util_create_pixbuf_from_data (const guchar      *data,
 
 typedef const gchar *(*ShellGLGetString) (GLenum);
 
-cairo_surface_t *
-shell_util_composite_capture_images (StCapture  *captures,
-                                     int         n_captures,
-                                     int         x,
-                                     int         y,
-                                     int         target_width,
-                                     int         target_height,
-                                     float       target_scale)
-{
-  int i;
-  cairo_format_t format;
-  cairo_surface_t *image;
-  cairo_t *cr;
-
-  g_assert (n_captures > 0);
-  g_assert (target_scale > 0.0f);
-
-  format = cairo_image_surface_get_format (captures[0].image);
-  image = cairo_image_surface_create (format, target_width, target_height);
-  cairo_surface_set_device_scale (image, target_scale, target_scale);
-
-  cr = cairo_create (image);
-
-  for (i = 0; i < n_captures; i++)
-    {
-      StCapture *capture = &captures[i];
-
-      cairo_save (cr);
-
-      cairo_translate (cr,
-                       capture->rect.x - x,
-                       capture->rect.y - y);
-      cairo_set_source_surface (cr, capture->image, 0, 0);
-      cairo_paint (cr);
-
-      cairo_restore (cr);
-    }
-  cairo_destroy (cr);
-
-  return image;
-}
-
 #ifndef HAVE_FDWALK
 static int
 fdwalk (int  (*cb)(void *data, int fd),
index 8e29ec7ce1e810c98a34aeb5ad67025085415ac7..03e75abeceef8c640b4f21bea4ccb0622fabd6ae 100644 (file)
 
 G_BEGIN_DECLS
 
-typedef struct _StCapture
-{
-  cairo_surface_t *image;
-  MtkRectangle rect;
-} StCapture;
-
 void     shell_util_set_hidden_from_pick       (ClutterActor     *actor,
                                                 gboolean          hidden);
 
@@ -52,14 +46,6 @@ GdkPixbuf *shell_util_create_pixbuf_from_data (const guchar      *data,
                                                int                height,
                                                int                rowstride);
 
-cairo_surface_t * shell_util_composite_capture_images (StCapture  *captures,
-                                                       int         n_captures,
-                                                       int         x,
-                                                       int         y,
-                                                       int         target_width,
-                                                       int         target_height,
-                                                       float       target_scale);
-
 void shell_util_check_cloexec_fds (void);
 
 void   shell_util_start_systemd_unit          (const char           *unit,